Migrate simple try-with-resources use of AgentScope to ContextScope#11763
Conversation
cfdacad to
7ababa2
Compare
Debugger benchmarksParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 9 metrics, 6 unstable metrics. See unchanged results
Request duration reports for reportsgantt
title reports - request duration [CI 0.99] : candidate=None, baseline=None
dateFormat X
axisFormat %s
section baseline
noprobe (334.115 µs) : 304, 364
. : milestone, 334,
basic (294.85 µs) : 288, 302
. : milestone, 295,
loop (8.972 ms) : 8966, 8977
. : milestone, 8972,
section candidate
noprobe (339.931 µs) : 298, 381
. : milestone, 340,
basic (292.935 µs) : 287, 299
. : milestone, 293,
loop (8.972 ms) : 8966, 8978
. : milestone, 8972,
|
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
Kafka / producer-benchmarkParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics. See unchanged results
|
Kafka / consumer-benchmarkParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics. See unchanged results
|
There was a problem hiding this comment.
More details
Uniform mechanical refactor across 88 files: every try-with-resources variable declaration changes from AgentScope to ContextScope, which is a valid widening reference conversion because AgentScope extends ContextScope. No method calls on the scope variable are added or removed; all callers (activateSpan, activateManualSpan, continuation.activate()) continue to return AgentScope at runtime, so close() dispatches identically via virtual method invocation. Null-scope safety in Wrapper.java is preserved by the JLS try-with-resources spec.
📊 Validated against 4 scenarios · Open Bits AI session
🤖 Datadog Autotest · Commit 7ababa2 · What is Autotest? · Any feedback? Reach out in #autotest
daniel-mohedano
left a comment
There was a problem hiding this comment.
LGTM wrt CiVis changes
7ababa2 to
e312c12
Compare
|
🎯 Code Coverage (details) 🔗 Commit SHA: e312c12 | Docs | Datadog PR Page | Give us feedback! |
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
Motivation
Reduce use of
AgentScopein the codebase - first round of migrationContributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issue/merge. You can also:/merge --commit-message "..."/merge -c/merge -f --reason "reason"; please use this judiciously, as some checks do not run at the PR-level (note: the PR still needs to be mergeable, this will only skip the pre-merge build)Jira ticket: [PROJ-IDENT]